package com.hesicare.health.service.impl;

import com.hesicare.health.entity.HisAdviceMidinfo;
import com.hesicare.health.mapper.HisAdviceMidinfoMapper;
import com.hesicare.health.service.IHisAdviceMidinfoService;
import com.hesicare.untils.StringUtil.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 55097
 */
@Service
public class HisAdviceMidinfoServiceImpl implements IHisAdviceMidinfoService {

    @Autowired
    private HisAdviceMidinfoMapper hisAdviceMidinfoMapper;

    @Override
    public HisAdviceMidinfo getHisAdviceMidinfoById(String prescriptionId) {
        HisAdviceMidinfo hisAdviceMidinfo = null;
        if (StringUtil.isNotBlank(prescriptionId)) {
            hisAdviceMidinfo = hisAdviceMidinfoMapper.selectHisAdviceMidinfoById(prescriptionId);
        }
        return hisAdviceMidinfo;
    }

    @Override
    public void insertHisAdviceMidinfo(HisAdviceMidinfo hisAdviceMidinfo) {
        hisAdviceMidinfoMapper.insertHisAdviceMidinfo(hisAdviceMidinfo);
    }

    @Override
    public void updateHisAdviceMidinfo(HisAdviceMidinfo hisAdviceMidinfo) {
        hisAdviceMidinfoMapper.updateHisAdviceMidinfo(hisAdviceMidinfo);
    }

}
